package com.niit.controller;

import com.niit.dto.StudentDTO;
import com.niit.entity.Student;
import com.niit.mapper.StudentMapper;
import com.niit.util.MybatisUtil;
import org.apache.ibatis.session.SqlSession;

import java.util.HashMap;
import java.util.Map;

public class TestParamDTO {
    public static void main(String[] args) {

        SqlSession sqlSession = MybatisUtil.getSqlSession();

        StudentMapper studentMapper = sqlSession.getMapper(StudentMapper.class);

        StudentDTO studentDTO = new StudentDTO();
        studentDTO.setSname("丛宇");
        studentDTO.setSbatch("22软件外包01班");

        Student student = studentMapper.getStudentByNameAndBatch3(studentDTO);
        System.out.println(student.getSid());
    }
}
